<?php
$fd = fopen("names.txt", 'r');
$n_arr = fread($fd, filesize("names.txt"));
fclose($fd);
$n_arr = split("\n", $n_arr);

$fd = fopen("surnames.txt", 'r');
$s_arr = fread($fd, filesize("surnames.txt"));
fclose($fd);
$s_arr = split("\n", $s_arr);

for($i = 0; $i < 30; $i++) {
	$rnd_name     = $n_arr[rand(0, count($n_arr) - 1)];
	$rnd_surname  = $s_arr[rand(0, count($s_arr) - 1)];
	echo $rnd_name." ".$rnd_surname."\t";
	echo urlencode(iconv("UTF-8", "windows-1251//IGNORE", $rnd_name." "));
	echo urlencode(iconv("UTF-8", "windows-1251//IGNORE", $rnd_surname));
	echo "\n";
}
?>